package com.data.controller;


import java.text.SimpleDateFormat;
import java.util.Date;

import javax.annotation.Resource;
import org.springframework.stereotype.Component;

import com.data.service.BaseDataDtoService;
@Component("dataDeleteTask")
public class BaseDataDtoController {
	@Resource(name="baseDataDtoService")
	private BaseDataDtoService baseDataDtoService;
	/**
	 * 定时删除baseDataDto表中的数据
	 * @param date
	 */
	public void deleteTask(){
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		baseDataDtoService.deleteBaseDataDto(sdf.format(new Date(new Date().getTime()-24*3600*1000L)));
	}
}